﻿package cpgears.views 
{
	import cpgears.IInteractive;
	import cpgears.properties.IWidgetProperties;
	import cpgears.movie.IMovie;
	/**
	 * Runtime View for an Interactive Widget.
	 * 
	 * @author Whyves
	 */
	public class InteractiveWidgetView extends RuntimeWidgetView
	{
		private var mInteractiveFunctions:IInteractive = null;
		
		/**
		 * Creates a Runtime view for an interactive widget.
		 * 
		 * @param	interactivity The API required to access the additional functionality of an Interactive Widget.
		 */
		public function InteractiveWidgetView(interactiveFunctions:IInteractive) 
		{
			super();
			if (interactiveFunctions == null) throw new ArgumentError("The parameter 'interactiveFunctions' cannot be null.");
			mInteractiveFunctions = interactiveFunctions;
		}
		
		/**
		 * @copy cpgears.IInteractive#setSuccess()
		 */
		public function setSuccess():void  {
			mInteractiveFunctions.setSuccess();
		}
		
		/**
		 * @copy cpgears.IInteractive#setFailure()
		 */
		public function setFailure():void {
			mInteractiveFunctions.setFailure();
		}
		
		/**
		 * @copy cpgears.IInteractive#showHint()
		 */
		public function showHint():void {
			mInteractiveFunctions.showHint();
		}
		
		/**
		 * @copy cpgears.IInteractive#hideHint()
		 */
		public function hideHint():void {
			mInteractiveFunctions.hideHint();
		}
		
		/**
		 * @copy cpgears.IInteractive#resetInteraction()
		 */
		public function resetInteraction():void {
			mInteractiveFunctions.resetInteraction();
		}
		
		
	}
}